package com.kaili.quartz.job;

import org.quartz.JobExecutionContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.stereotype.Component;

import java.util.Date;

/**
 * Created by renzhikun on 18-9-12.
 */
@Configuration
@Component("job")
@EnableScheduling
public class Job {
    private Logger logger = LoggerFactory.getLogger(getClass());

   public void jobDetail(JobExecutionContext context){
       logger.info("[20s执行一次]ob-quartz   "+new Date());
   }

   public void jobDetail2(JobExecutionContext context){
       logger.info("[50s执行一次]ob-quartz   "+new Date());
    }
}
